import { postAction } from '@/api/manage' //post
import { getAction } from '@/api/manage' //get
// 通用
export const getDictList = (params) => postAction('/basemgt-bom/bom/getNewStyleHeadKs', params)
export const getList = (params) => postAction('/basemgt-bom/bom/getNewStyleHeadKsFind', params)
export const detail = (params) => getAction(`/basemgt-bom/bom/getNewStyleHeadKsInfo?billNo=${params}`)
export const getlist = (params) => getAction(`/basemgt-bom/style/require/getNewStyleRequire?billNo=${params}`)
export const getNewStyleTypeSaleColor = (params) => getAction(`/basemgt-bom/bom/number/getNewStyleTypeSaleColor?billNo=${params}`)
export const deleteNewStyleTypeSale = (params) => postAction(`/basemgt-bom/bom/number/deleteNewStyleTypeSale`,params)
export const updateNewStyleTypeSale = (params) => postAction('/basemgt-bom/bom/number/updateNewStyleTypeSale',params)
export const addNewStyleTypeSale = (params) => postAction('/basemgt-bom/bom/number/addNewStyleTypeSale',params)
export const getJColorList = (params) => postAction('/basemgt-bom/color/getJColorList',params)
export const getNewStyleSizeList = (params) => postAction(`/basemgt-bom/bom/size/getNewStyleSizeList?billNo=${params}`)
export const getNewStyleTypeNumber = (params) => getAction(`/basemgt-bom/bom/number/getNewStyleTypeNumber?billNo=${params}`)

//件数信息保存
export const updateNewStyleTypeNumber = (params) => postAction(`/basemgt-bom/bom/number/updateNewStyleTypeNumber`,params)
//波段接口
export const getBandList = (params) => getAction(`/basemgt-bom/kfkbcode/getBandList?bandName=${params}`)
//3.面料代码
export const getNewStyleBomDet = (params) => getAction(`/basemgt-bom/bom/style/getNewStyleBomDet?billNo=${params}`)
//如果部位输入横机片
export const getFlatSheetMain = (params) => getAction(`/basemgt-bom/bom/style/getFlatSheetMain?billNo=${params}`)
//如果不是横机片
export const getShellFabric = (params) => postAction(`/basemgt-bom/bom/getShellFabric`,params)

export const getNewStyleBomIngredients = (params) => getAction(`/basemgt-bom/bom/style/getNewStyleBomIngredients?billNo=${params}`)
//辅料编号
export const getIngredients = (params) => postAction(`/basemgt-bom/bom/getIngredients`,params)
//辅料规格
export const getSpecification = (params) => postAction(`/basemgt-bom/bom/getSpecification`,params)
//辅料颜色
export const getIngColor = (params) => postAction(`/basemgt-bom/bom/getIngColor`,params)
//添加辅料
export const saveNewStyleBomIngredients = (params) => postAction(`/basemgt-bom/bom/style/saveNewStyleBomIngredients`,params)
//11.删除辅料信息
export const deleteNewStyleBomIngredients = (params) => postAction(`/basemgt-bom/bom/style/deleteNewStyleBomIngredients`,params)
//款式要求
export const getNewStyleRequire = (params) => getAction(`/basemgt-bom/style/require/getNewStyleRequire?billNo=${params}`)
//编辑用线/裁剪要求/普通工艺
export const getNewStyleRequireDet = (params) => getAction(`/basemgt-bom/style/require/getNewStyleRequireDet?billNo=${params.billNo}&type=${params.type}`)
export const saveAndUpdateNewStyleRequire = (params) => postAction(`/basemgt-bom/style/require/saveAndUpdateNewStyleRequire`,params)
export const getStyleDetailReq = (params) => getAction(`/basemgt-bom/style/require/getStyleDetailReq?reqType=${params.reqType}`)
// 16.问题闭环接口/
export const getNewStyleIssue = (params) => getAction(`/basemgt-bom/bom/issue/getNewStyleIssue?billNo=${params.billNo}&jobNumber=${params.jobNumber}&username=${params.username}&roleCodeList=${params.roleCodeList}`)
export const saveNewStyleIssue4Node = (params) => postAction(`/basemgt-bom/bom/issue/saveNewStyleIssue4Node`,params)
export const updateNewStyleIssue4Node = (params) => postAction(`/basemgt-bom/bom/issue/updateNewStyleIssue4Node`,params)
export const deleteNewStyleIssue4Node = (params) => getAction(`/basemgt-bom/bom/issue/deleteNewStyleIssue4Node?billNo=${params.billNo}&rowNo=${params.rowNo}`)
//20.款式其他信息
export const getNewStyleHeadKsOtherInfo = (params) => getAction(`/basemgt-bom/bom/getNewStyleHeadKsOtherInfo?billNo=${params}`)
export const newStyleHeadKsOtherSave = (params) => postAction(`/basemgt-bom/bom/newStyleHeadKsOtherSave`,params)
